<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>订单列表</title>
        <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="stylesheet" href="../../../../css/mui.min.css">
    </head>
    <body>
        <!--下拉刷新容器-->
		<div id="pullrefresh" class="mui-content mui-scroll-wrapper">
            <div class="mui-scroll">
                <!--数据列表-->
                <ul class="mui-table-view mui-table-view-chevron" id="list">

                </ul>
            </div>
        </div>
        <script src="../../../../js/mui.min.js"></script>
        <script src="../../../../js/http.js"></script>
        <script src="../../../../js/userInfo.js"></script>
        <script src="../../../../js/template.js"></script>
        <script src="../../../../js/tool.js"></script>
        <script src="../../../../js/aPullRefresh.js"></script>
        <script id="pullList" type="text/html">
            {{each}}
            <li class="mui-table-view-cell" data-id="{{$value.id}}">
                <a class="mui-navigate-right">{{$value.id}}</a>
            </li>
            {{/each}}
        </script>
        <script>

            // 初始化数据
            $.plusReady(function() {
                // 初始化参数
                aPullRefresh = {
                    url: '/order/getOrderList',
                    layer: $("#list")[0],
                    pullRefreshLayer: $('#pullrefresh'),
                    opt: {
                        orderType: 2,
                        userId: 60763,
                        isPay: false,
                        current: 0,
                        size: 10
                    }
                };

                setTimeout(function() {
                    // mui('#pullrefresh').pullRefresh().pullupLoading();
                    aPullRefresh.pullRefreshLayer.pullRefresh().pullupLoading();
                }, 1000);
                // 绑定列表点击数据
                $('#list').on('tap', 'li', function() {
                    var id = this.getAttribute('data-id');
                    $.openWindow({
                        id: 'orderDetail',
                        url: 'orderDetail.html',
                        waiting: {
                            autoShow: false
                        }
                    });
                })
            });
       </script>
    </body>
</html>